package org.web.ssm.dao;

import org.web.ssm.model.Shopping;

import java.util.List;

/**
 * Created by LUOLIANG on 2016/6/18.
 */
public interface ShoppingMapper {
    Shopping selectByPrimaryKey(String id);

    /**
     * 根据userid查询所有
     *
     * @param userid
     * @return
     */
    List<Shopping> selectAll(String userid);

    /**
     * 插入一个清单物品
     *
     * @param shopping
     * @return
     */
    Integer insertShopping(Shopping shopping);

    /**
     * 执行更新操作，用于把某件物品更新为已完成或未完成
     *
     * @param shopping
     * @return
     */
    Integer updateShopping(Shopping shopping);

    /**
     * 根据id删除
     *
     * @param id
     * @return
     */
    Integer deleteShopping(String id);
}
